package groep3.ssc.model;

import groep3.ssc.controllers.ModelRepository;
import android.util.SparseArray;

public class Race
{
    private SparseArray<Skater> skaters;
    private int distanceToSkate;
    private int ourSkater = -1;
    private int targetSchemeId;
    private int id;

    public Race()
    {
        skaters = new SparseArray<Skater>();
    }

    public SparseArray<Skater> getSkaters()
    {
        return skaters;
    }

    public void setSkaters(SparseArray<Skater> skaters)
    {
        this.skaters = skaters;
    }

    public void addSkater(int id, Skater skater)
    {
        skaters.put(id, skater);
    }

    public Skater getSkater(int id)
    {
        return skaters.get(id);
    }

    public int getDistanceToSkate()
    {
        return distanceToSkate;
    }

    public void setDistanceToSkate(int distanceToSkate)
    {
        this.distanceToSkate = distanceToSkate;
    }

    public int getOurSkater()
    {
        return ourSkater;
    }

    public void setOurSkater(int ourSkater)
    {
        this.ourSkater = ourSkater;
    }

    public Scheme getTargetScheme()
    {
        return ModelRepository.getInstance().getScheme(targetSchemeId);
    }

    public int getId()
    {
        return id;
    }

    public void setId(int id)
    {
        this.id = id;
    }

    public void setTargetSchemeId(int schemeId)
    {
        this.targetSchemeId = schemeId;
    }
    
}